#ifndef MOTION_H_INCLUDED
#define MOTION_H_INCLUDED

#include "common.h"

extern int Motions;

class Missile;
class Monster;

class Motion
{
public:
    Motion() { ++Motions; }
    virtual ~Motion() { --Motions; }
    void move(Missile *m);
protected:
    virtual void real_move(Missile *m);
};

class MoveToPoint : public Motion
{
public:
    MoveToPoint(const Rect &dest);
    void setDest(const Rect &dest);
protected:
    virtual void real_move(Missile *m);
private:
    Rect m_dest;
};

class TraceMonster : public Motion
{
public:
    TraceMonster(Monster *m);
    ~TraceMonster();
    void setTarget(Monster *m);
protected:
    virtual void real_move(Missile *m);
private:
    Monster *m_monster;
};

#endif // MOTION_H_INCLUDED
